<?php

use Faker\Generator as Faker;

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/

$factory->define(App\User::class, function (Faker $faker) {
    static $password;

    return [
        'username' => $faker->name,
        'phone' => $faker->unique()->phoneNumber,
        'password' => $password ?: $password = bcrypt('secret'),
        'remember_token' => str_random(10),
    ];
});

$factory->define(App\Master::class, function (Faker $faker) {

    return [
        'master_name' => $faker->name,
    ];
});

$factory->define(App\Activity::class, function (Faker $faker) {

    return [
        'activity_name' => $faker->name,
        'activity_place' => $faker->address,
        'activity_date' => $faker->dateTimeBetween(),
        'activity_charge' => $faker->creditCardNumber,
        'enrollments' => $faker->numerify(10),
        'activity_phone' => $faker->phoneNumber,
        'activity_intro' => $faker->address
    ];
});

$factory->define(App\MasterVideo::class, function (Faker $faker) {

    return [
        'video_name' => $faker->name,
        'video_intro' => $faker->sentence,
        'master_id' => $faker->numerify(2),
        'video_address' => $faker->address,
    ];
});
$factory->define(App\Question::class, function (Faker $faker) {

    return [
        'master_name' => $faker->name,
        'question_content' => $faker->sentence,
        'master_id' => $faker->numerify(2),
        'username' => $faker->name,
        'user_id' => $faker->numerify(1),
    ];
});
$factory->define(App\Answer::class, function (Faker $faker) {

    return [
        'master_name' => $faker->name,
        'answer_content' => $faker->sentence,
        'master_id' => $faker->numerify(2),
        'question_id' => $faker->numerify(1),
    ];
});
$factory->define(App\Club::class, function (Faker $faker) {

    return [
        'club_name' => $faker->name,
        'club_intro' => $faker->sentence,
        'club_address' => $faker->address,
        'club_phone' => $faker->phoneNumber,
        'work_time' => $faker->dateTimeBetween(),
        'club_pic' => $faker->name
    ];
});